package com.zoshine.zzg.pojo.pojostatus;

import java.util.Objects;

/**
 * 菜单状态枚举
 *
 * @author 贾俊峰
 * @time 2017/6/20 17:42
 */
public enum MenuStatus {
    HIDE(0, "隐藏"),
    SHOW(1, "显示");

    private int value;
    private String desc;
    MenuStatus(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public static String getDesc(Integer value) {
        for (MenuStatus menuStatus : MenuStatus.values()) {
            if (Objects.equals(menuStatus.value, value)) {
                return menuStatus.desc;
            }
        }
        return null;
    }
}
